<?php
$this->widget('ext.pagetitle.PageTitle');

$this->breadcrumbs=array(
	Yii::t('admin', 'Administration') => array('/admin'),
	Yii::t('admin', 'Users') => array('admin'),
	CHtml::encode($model->name),
);

$this->menu=array(
	array('label'=>Yii::t('admin','Create User'),'url'=>array('create')),
	array('label'=>Yii::t('admin','Update User'),'url'=>array('update', 'id'=>$model->id)),
	array('label'=>Yii::t('admin','Delete User'),'url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
);
?>

<h1><?php echo Yii::t('admin','User'); ?> #<?php echo $model->id; ?></h1>

<?php $this->widget('BootstrapDetailView',array(
	'data'=>$model,
	'attributes'=>array(
		array(
			'name'=>'id',
			'label'=>'#',
		),
		'name',
		array(
			'name'=>'email',
			'type'=>'raw',
			'value'=>CHtml::mailto($model->email,$model->email),
		),
		array(
			'name'=>'created',
			'value'=>Yii::app()->dateFormatter->formatDateTime($model->created,'medium','short'),
		),
		array(
			'name'=>'updated',
			'value'=>Yii::app()->dateFormatter->formatDateTime($model->updated,'medium','short'),
		),
	),
)); ?>

<h3><?php echo Yii::t('admin','Entries'); ?></h3>

<?php $this->widget('BootstrapGridView',array(
	'dataProvider'=>$entries,
	'columns'=>array(
		array(
			'name'=>'id',
			'header'=>'#',
		),
		'name',
		array(
			'name'=>'contestId',
			'value'=>'$data->contest->name',
			'header'=>Yii::t('label','Contest'),
		),
		'imageId',
		array(
			'name'=>'status',
			'value'=>'$data->getStatusString()',
		),
		array(
			'name'=>'creatorId',
			'value'=>'$data->submitter->name',
			'header'=>Yii::t('label','Submitter'),
		),
		array(
			'name'=>'created',
			'value'=>'Yii::app()->dateFormatter->formatDateTime($data->created,\'medium\',\'medium\')',
		),
		array(
			'name'=>'updated',
			'value'=>'Yii::app()->dateFormatter->formatDateTime($data->updated,\'medium\',\'medium\')',
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>